package edu.jd.movieplatform.admin.a_movie.dao;

import edu.jd.movieplatform.admin.a_movie.a_Movie;
import edu.jd.movieplatform.admin.a_movie.a_MovieDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface a_MovieDao {

    List<a_Movie> finda_MovieList(a_MovieDto dto);

    @Delete("delete from movie where mov_id=#{id}")
    void deleteMovie(Integer id);

    @Insert("insert into movie(mov_name,mov_desc,mov_img_path,mov_label,mov_time,mov_date) values(#{mov_name},#{mov_desc},#{mov_img_path},#{mov_label},#{mov_time},#{mov_date})")
    void insertMovie(a_MovieDto dto);

    @Update("update movie set mov_name=#{mov_name},mov_desc=#{mov_desc},mov_img_path=#{mov_img_path},mov_label=#{mov_label},mov_time=#{mov_time},mov_date=#{mov_date} where mov_id=#{mov_id}")
    void updateMovie(a_MovieDto dto);
}
